<!-- 详情-报价信息 -->
<template>
	<Card :showBodySlot="show">
		<template #head>
			<view class="u-flex u-row-between">
				<view class="text">
					报价信息
				</view>
				<view class=" text text-time ">
					<template v-if="data.quoteEndTime">
						截止时间: {{data.quoteEndTime || '-'}}
					</template>
				</view>
			</view>
		</template>
		<!-- 报价未通过 -->

		<template #body>
			<CellItemDetail label="报价人" :value="data.quoteUserToName"></CellItemDetail>
			<CellItemDetail label="报价时间" :value="data.quoteTime"></CellItemDetail>
			<CellItemDetail label="报价金额" :value="data.quoteMoney" unit="元"></CellItemDetail>
			<CellItemDetail label="附件" :value="data.enclosure" type="attachment"></CellItemDetail>
		</template>
	</Card>
</template>

<script>
	import Card from '@/components/card/components/cardDetail.vue'
	import CellItemDetail from '@/components/cell/itemDetail.vue'
	export default {

		props: {
			// sendRepairInfo: {
			// 	type: Object,
			// 	default: () => {}
			// },
			showQuoteInfo: Boolean,
			//报价信息
			quoteInfo: {
				type: Object,
				default: () => {}
			}
		},
		components: {
			Card,
			CellItemDetail
		},
		data() {
			return {
				data: {},
				show: false,
			}
		},
		watch: {
			showQuoteInfo: function(val) {
				this.show = val
			},
			quoteInfo: {
				deep: true,
				handler: function(val) {
					if (val) {
						console.log(val, 'watch');
						this.data = val
					}
				}

			}
		}
	}
</script>

<style lang="scss" scoped>
	.text {
		font-weight: 600;
		font-size: 28rpx;

		&-time {
			color: #F56C6C;
		}
	}
</style>
